home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / bash_114.zip / bash-1.14.2 / documentation / Makefile < prev    next >
Makefile  |  1994-07-14  |  3KB  |  120 lines

  1. # This Makefile is for the Bash/documentation directory -*- text -*-.
  2. #
  3. CP        = cp
  4. RM        = rm -f
  5.  
  6. INSTALL_DATA = install -c -m 644
  7.  
  8. DOC_SUPPORT = ../lib/doc-support/
  9. TEXINDEX    = $(DOC_SUPPORT)texindex
  10. TEXINDSRC   = $(DOC_SUPPORT)texindex.c
  11. TEX        = tex
  12. QUIETPS        = #set this to -q to shut up dvips
  13. DVIPS        = dvips -D 300 $(QUIETPS) -o $@    # tricky
  14. TEXINPUTS   = ./../lib/readline/doc
  15. MAKEINFO    = makeinfo
  16.  
  17. # Change to groff -Tascii if you don't have nroff
  18. NROFF        = nroff
  19.  
  20. # This should be a program that converts troff to postscript
  21. GROFF        = groff
  22.  
  23. HSUSER      = ./../lib/readline/doc/hsuser.texinfo
  24. RLUSER      = ./../lib/readline/doc/rluser.texinfo
  25.  
  26. .SUFFIXES:    .1 .3 .ms .ps .txt .dvi
  27.  
  28. .1.ps:
  29.     $(RM) $@
  30.     ${GROFF} -man $< > $@
  31.  
  32. .1.txt:
  33.     $(RM) $@
  34.     ${NROFF} -man $< > $@
  35.  
  36. .ms.ps:
  37.     $(RM) $@
  38.     ${GROFF} -ms $< > $@
  39.  
  40. .ms.txt:
  41.     $(RM) $@
  42.     ${NROFF} -ms $< > $@
  43.  
  44. .3.ps:
  45.     $(RM) $@
  46.     ${GROFF} -man $< > $@
  47.  
  48. .3.txt:
  49.     $(RM) $@
  50.     ${NROFF} -man $< > $@
  51.  
  52. all: ps info dvi text
  53.  
  54. ps: bash.ps builtins.ps readline.ps article.ps
  55. dvi: features.dvi features.ps 
  56. info: features.info
  57. text: bash.txt builtins.txt readline.txt article.txt
  58.  
  59. features.dvi: features.texi $(HSUSER) $(RLUSER)
  60.     TEXINPUTS=.:$(TEXINPUTS):$$TEXINPUTS $(TEX) features.texi
  61.     $(TEXINDEX) features.??
  62.     TEXINPUTS=.:$(TEXINPUTS):$$TEXINPUTS $(TEX) features.texi
  63.  
  64. features.ps: features.dvi
  65.     $(RM) $@
  66.     $(DVIPS) features.dvi
  67.  
  68. features.info: features.texi $(HSUSER) $(RLUSER)
  69.     $(MAKEINFO) --no-split -I$(TEXINPUTS) features.texi
  70.  
  71. bash.dvi: $(TEXINDEX) bash.texinfo $(HSUSER) $(RLUSER)
  72.     TEXINPUTS=.:$(TEXINPUTS):$$TEXINPUTS $(TEX) bash.texinfo
  73.     $(TEXINDEX) bash.??
  74.     TEXINPUTS=.:$(TEXINPUTS):$$TEXINPUTS $(TEX) bash.texinfo
  75.  
  76. bashman.ps: bash.dvi
  77.     rm -f $@
  78.     $(DVIPS) bash.dvi
  79.  
  80. bash.txt: bash.1
  81. bash.ps: bash.1
  82. builtins.ps: builtins.1 bash.1
  83. builtins.txt: builtins.1 bash.1
  84. readline.txt: readline.3
  85. readline.ps: readline.3
  86. article.ps: article.ms
  87.  
  88. $(TEXINDEX): $(TEXINDSRC)
  89.     (cd $(DOC_SUPPORT); $(MAKE) $(MFLAGS) texindex)
  90.  
  91. hsuser.texinfo: ../lib/readline/doc/hsuser.texinfo
  92.     ln -s ../lib/readline/doc/hsuser.texinfo .
  93.  
  94. rluser.texinfo: ../lib/readline/doc/rluser.texinfo
  95.     ln -s ../lib/readline/doc/rluser.texinfo .
  96.  
  97. clean:
  98.     rm -f *.aux *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.cps *.pgs \
  99.     *.fns *.kys *.tps *.vrs *.o core texindex rluser.texinfo hsuser.texinfo
  100.  
  101. distclean:
  102.     rm -f *.aux *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.cps *.pgs \
  103.     *.dvi *.info *.info-* *.fns *.kys *.tps *.vrs *.o core texindex \
  104.     rluser.texinfo hsuser.texinfo
  105.  
  106. realclean:    clean
  107.  
  108. install: all
  109.     [ -d $(mandir) ] || mkdir $(mandir)
  110.     $(INSTALL_DATA) bash.1 $(mandir)
  111.     sed 's:so bash.1:so man1/bash.1:' < builtins.1 > $(mandir)/bash_builtins.1
  112.     [ -d $(man3dir) ] || mkdir $(man3dir)
  113.     $(INSTALL_DATA) readline.3 $(man3dir)
  114.     [ -d $(infodir) ] || mkdir $(infodir)
  115.     $(INSTALL_DATA) features.info $(infodir)/bash.info
  116.  
  117. uninstall:
  118.     $(RM) $(mandir)/bash.1 $(mandir)/bash_builtins.1
  119.     $(RM) $(man3dir)/readline.3 $(infodir)/bash.info
  120.